package com.xuecheng.comment.mapper;

import com.xuecheng.comment.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author itcast
 */
public interface CommentMapper extends BaseMapper<Comment> {

    @Update("UPDATE `comment` SET praise_num = praise_num + 1 WHERE id = #{commentId}; ")
    Boolean praiseComment(@Param("commentId") Long commentId);

//    @Update("UPDATE `comment` SET `status` = 0 WHERE id IN (#{commentIds}); ")
//    Boolean deleteComment(@Param("commentIds") String[] commentIds);

}
